import java.sql.SQLOutput;

public class Demo11 {
    public static void main(String[] args) throws InterruptedException {
        Object object = new Object();
        synchronized (object) {
            System.out.println("wait之前");
            //把wait要放在synchronized里面来调用,保证确实是拿到锁了的
            object.wait();
            System.out.println("wait之后");
        }
    }
}
